package com.txhy.certificatechain.api;

import com.lzy.okgo.OkGo;
import com.lzy.okrx2.adapter.ObservableBody;
import com.txhy.certificatechain.helper.JsonConvert;
import com.txhy.certificatechain.model.data.ResponseData;
import com.txhy.certificatechain.model.qrcode.QcodeBean;

import io.reactivex.Observable;

/*
 * -----------------------------------------------------------------
 * Copyright (C) 2018-2030, by your company, All rights reserved.
 * -----------------------------------------------------------------
 * 文    件: UrlAddress.java
 * 作    者: 侯建军
 * 版    权: 1.0.0
 * 描    述: API接口地址
 * 创建时间: 2018/9/19 16:58
 * 更新时间：2018/9/19 16:58
 * -----------------------------------------------------------------
 * 2018/9/19 16:58: 创建 UrlAddress.java (侯建军);
 * -----------------------------------------------------------------
 */
public class UrlAddress {
//    网络接口地址
//    public static final String BASE_URL = "http://wanandroid.com/";
    //本地接口地址
    public static final String BASE_URL = "http://192.168.1.122:8001";
    //图片本地地址前缀
    public static final String IMGBASE_URL = "http://192.168.1.156:8000";
    //本地上传图片接口地址
    public static final String BASE_IMGURL = BASE_URL + "/file/file/upload";
    //注册的接口
    public static final String REGISTER_URL = BASE_URL + "/usercenter/user/public/phoneRegister";
    //发送验证码
    public static final String SENDCODE_URL = BASE_URL + "/usercenter/user/public/getVerifiCode";
    //上传身份证信息
    public static final String SAVEIDCARD_URL = BASE_URL + "/usercenter/user/public/saveIdCard";
    //上传三张人脸图片
    public static final String CHECKFACE_URL = BASE_URL + "/usercenter/user/public/checkFace";
    //上传银行卡信息
    public static final String SAVEBANK_URL = BASE_URL + "/usercenter/user/public/saveBankCard";
    //登录发送验证码
    public static final String GETLOGINV_URL = BASE_URL + "/usercenter/user/public/getLoginVerifiCode";
    //用户登陆生物验证
    public static final String BIOLOGYCHECK_URL = BASE_URL + "/usercenter/user/public/biologyCheck";
    //用户登陆
    public static final String PHONECHECK_URL = BASE_URL + "/usercenter/user/public/phoneCheck";
    //用户登陆
    public static final String USERLOGIN_URL = BASE_URL + "/usercenter/user/public/userLogin";
    //上传营业执照
    public static final String ENTERPRI_URL = BASE_URL + "/usercenter/user/enterpriseRegister";
    //
    public static final String BANKPHHONE_URL = BASE_URL + "/usercenter/user/public/bankPhoneCheck";
    //获取金额的二维码
    public static final String GETINCOME_URL = BASE_URL + "/pay/operate/getInMoneyQrCode";
    //获取二维码扫描状态
    public static final String CHECKQR_URL = BASE_URL + "/pay/operate/checkQrCode";
    //获取二维码扫描状态
    public static final String GETMONTHAND_URL = BASE_URL + "/pay/record/getMonthAndPageList";
    //清除后台的缓存
    public static final String CLEAN_URL = BASE_URL + "/pay/operate/clearCode";
    //开通交易币的信用额度
    public static final String CGETINIT_URL = BASE_URL + "/pay/account/getInitialCredit";
    //开通交易币账户
    public static final String OPENACCOUT_URL = BASE_URL + "/pay/account/openAccount";
    //我的交易币账户
    public static final String GETACCOUNT_URL = BASE_URL + "/pay/account/getAmount";
    //获取我的账户信息和他人的基本信息
    public static final String BACKUSER_URL = BASE_URL + "/pay/operate/backUserPayInfo";
    //
    public static final String CONFIRMIN_URL = BASE_URL + "/pay/operate/confirmInMoneyPay";
    //获取银行卡信息
    public static final String GETBANKLIST_URL = BASE_URL + "/usercenter/bank/getBankListByUserId";
    //接触绑定银行卡
    public static final String UNTIEBANK_URL = BASE_URL + "/usercenter/bank/untieBankById";
    //增加银行卡
    public static final String ADDBANKBY_URL = BASE_URL + "/usercenter/bank/addBankByUserId";
    //收款明细
    public static final String RECEIVEDETAIL_URL = BASE_URL + "/pay/operate/receiveDetail";
    //收款明细
    public static final String SETDEFAULT_URL = BASE_URL + "/usercenter/bank/setDefaultStatus";
    //获取收款的数据
    public static final String GETOUTMONEY_URL = BASE_URL + "/pay/operate/getOutMoneyQrCode";
    //获取收款的数据
    public static final String APPLY_URL = BASE_URL + "/pay/delay/applyDelay";
    //获取通讯录的列表
    public static final String ADDRESS_URL = BASE_URL + "/im/im/addressBookList";
    //获取延期记录表数据
    public static final String GETDELAY_URL = BASE_URL + "/pay/delay/getDelayUserListAndPage";
    //	根据手机号获取用户信息
    public static final String GETSEARCH_URL = BASE_URL + "/usercenter/user/getSearchFriend";
    //	根据手机号获取用户信息
    public static final String FRIENDS_URL = BASE_URL + "/im/im/friendApply";
    //	根据手机号获取用户信息
    public static final String GETBORROW_URL = BASE_URL + "/pay/credit/getBorrowDetails";
    //	获取banner广告页面
    public static final String GETLB_URL = BASE_URL + "/system/advert/public/getLb";
    //	获取我的证照
    public static final String GETECART_URL = BASE_URL + "/ecard/ecard/getECart";
    //	获取我的证照
    public static final String GETAUTH_URL = BASE_URL + "/ecard/ecard/getAuthListByUserId";
    //
    public static final String GETECARD_URL = BASE_URL + "/ecard/ecard/getECardQrCode";
    //修改头像
    public static final String CHANGEAVATAR_URL = BASE_URL + "/usercenter/user/changeAvatar";
    //获取新闻的
    public static final String LIST_URL = BASE_URL + "/system/news/public/list";
    //注销
    public static final String LOGOFF_URL = BASE_URL + "/usercenter/user/logOff";
    //挂失
    public static final String REPORT_URL = BASE_URL + "/usercenter/user/reportLose";
    //换帮设备
    public static final String REPLACE_URL = BASE_URL + "/usercenter/user/replaceDeviceCheckFace";
    //换帮手机号
    public static final String REPLACEPHONE_URL = BASE_URL + "/usercenter/user/replacePhoneCheckFace";
    //duanxin
    public static final String GETPHONEVER_URL = BASE_URL + "/usercenter/user/getPhoneVerifiCode";
    //更换新手机号接口
    public static final String REPLACEP_URL = BASE_URL + "/usercenter/user/replacePhone";
    //获取收藏的
    public static final String LISTCOLLECT_URL = BASE_URL + "/order/api/listCollectByPage";
    //删除收藏的
    public static final String DELETECOLLECT_URL = BASE_URL + "/order/api/deleteCollect";
    //我的足迹
    public static final String LISTFOOT_URL = BASE_URL + "/order/api/listFootByPage";
    //clear我的足迹
    public static final String CLEAR_URL = BASE_URL + "/order/api/clearFoot";
    //单个删除我的足迹
    public static final String CLEARFOOT_URL = BASE_URL + "/order/api/deleteFoot";
    //
    public static final String GETROLELIST_URL = BASE_URL + "/usercenter/eAuth/getRoleList";
    //
    public static final String GETOPERATES_URL = BASE_URL + "/usercenter/eAuth/getOperatesList";
    //
    public static final String GETOPERA_URL = BASE_URL + "/usercenter/eAuth/getOperateList";
    //
    public static final String AUTHTOUSER_URL = BASE_URL + "/usercenter/eAuth/authToUser";
    //
    public static final String LISTSHOP_URL = BASE_URL + "/order/api/listShopcart";
    public static final String DELETESHOP_URL = BASE_URL + "/order/api/deleteShopCart";
    public static final String CHANGNUM_URL = BASE_URL + "/order/api/changNum";
    public static final String REMOVEROLE_URL = BASE_URL + "/usercenter/eAuth/removeRole";
    public static final String LISTEVALUA_URL = BASE_URL + "/order/evaluate/listEvaluateByPageUserId";
    public static final String DELETEEVA_URL = BASE_URL + "/order/evaluate/deleteEvaluate";
    public static final String LISTORDERBUY_URL = BASE_URL + "/order/order/listOrderByPage";
    public static final String ENTERPRISE_URL = BASE_URL + "/usercenter/user/enterprisePhoneCheck";
    public static final String GETGOODSINFO_URL = BASE_URL + "/goods/goods/public/getGoodsInfoByGoodsId";
    public static final String GETENTERPRI_URL = BASE_URL + "/usercenter/user/getEnterpriseInfo";
    public static final String LISTEVALUALUA_URL = BASE_URL + "/order/evaluate/public/listEvaluateByPageGoodsId";
    public static final String GETELICENSE_URL = BASE_URL + "/elicense/elicense/getELicenseCoverInfo";
    public static final String GETELICENSEQRCODE_URL = BASE_URL + "/elicense/elicense/getELicenseQrCode";
    public static final String TOOHTERAUTH_URL = BASE_URL + "/elicense/elicense/toOhterAuthList";
    public static final String REMOVEAUTH_URL = BASE_URL + "/elicense/elicense/removeAuthELicense";
    public static final String AUTHELICEN_URL = BASE_URL + "/elicense/elicense/authELicenseToUser";
    public static final String GETAUTHLIST_URL = BASE_URL + "/ecard/ecard/getAuthListByUserId";
    public static final String ADDCOLLECT_URL = BASE_URL + "/order/api/addCollect";
    public static final String ADDSHOPCART_URL = BASE_URL + "/order/api/addShopcart";
    public static final String AUTHTOFRIEND_URL = BASE_URL + "/ecard/ecard/authToFriend";
    public static final String GETAUTHTOOTHER_URL = BASE_URL + "/ecard/ecard/getAuthToOther";
    public static final String REMOVEAUTHA_URL = BASE_URL + "/ecard/ecard/removeAuth";
    //协议
    public static final String JYBOPEN_URL = BASE_URL + "/system/JybOpenProtocol.html";
    public static final String GETECARDQR_URL = BASE_URL + "/ecard/ecard/getECardQrCodeAuthentication";
    public static final String GETCONFIRM_URL = BASE_URL + "/elicense/elicense/getConfirmELicenseQrCode";
    public static final String LISTGOODSSHOW_URL = BASE_URL + "/goods/goods/public/listGoodsShowByShopId";
    public static final String LISTINDEX_URL = BASE_URL + "/shop/index/listIndex";
    public static final String GETCREDIT_URL = BASE_URL + "/pay/credit/getCreditConsumeRecord";
    public static final String GETCREDITR_URL = BASE_URL + "/pay/credit/getCreditReturnRecord";
    public static final String GETPAWNGOODS_URL = BASE_URL + "/pay/pawn/getPawnGoodsList";
    public static final String GETPAWNDETAYRE_URL = BASE_URL + "/pay/pawn/getPawnDelayRecordList";
    public static final String GETPAWMGOODS_URL = BASE_URL + "/pay/pawn/getPawnGoodsDetails";
    public static final String SPREAD_URL = BASE_URL + "/system/spread.html?userId=";
    public static final String LOGIN_URL = BASE_URL + "/shop/login/login";
    public static final String GETCONTRACT_URL = BASE_URL + "/contract/contract/getContractList";
    /**
     * 获取二维码
     */
    public static Observable<ResponseData<QcodeBean>> getQcodeData(String uesrId) {
        return OkGo.<ResponseData<QcodeBean>>post(GETINCOME_URL)
                .converter(new JsonConvert<ResponseData<QcodeBean>>() {
                })
                .adapt(new ObservableBody<ResponseData<QcodeBean>>());
    }
}

